#pragma once

#include <typedef.h>
//
#include <semaphore.hpp>
#include <task_run.hpp>

class TcpServerClient : public TaskRun
{
public:
	TcpServerClient();
	virtual ~TcpServerClient();
	void StartRun(const char* ip, int port, int socket);
	int SendData(char* data, int size);
	virtual void RecvData(char* data, int size) = 0;

protected:
	virtual void Start(void* arg = nullptr);
	virtual void Run(void* arg);

private:
	std::string m_Ip;
	int m_Port;
	int m_Socket;
	char* m_Buff;
};